﻿using EasyIot.WinApp;
using System;
using System.Windows.Forms;

namespace EasyIot.WinApp
{
    public partial class NumberKeyPad : UserControl
    {
        public NumberKeyPad()
        {
            InitializeComponent();
        }

        private void btnNum1_Click(object sender, EventArgs e)
        {
            DataMgr.MainHandle.OnTTKeyBoardInput(KeyType.Key_NUMBER, KeyValue.PIN_PRESSED_VK_1);
        }

        private void btnNum2_Click(object sender, EventArgs e)
        {
            DataMgr.MainHandle.OnTTKeyBoardInput(KeyType.Key_NUMBER, KeyValue.PIN_PRESSED_VK_2);
        }

        private void btnNum3_Click(object sender, EventArgs e)
        {
            DataMgr.MainHandle.OnTTKeyBoardInput(KeyType.Key_NUMBER, KeyValue.PIN_PRESSED_VK_3);
        }

        private void btnNum4_Click(object sender, EventArgs e)
        {
            DataMgr.MainHandle.OnTTKeyBoardInput(KeyType.Key_NUMBER, KeyValue.PIN_PRESSED_VK_4);
        }

        private void btnNum5_Click(object sender, EventArgs e)
        {
            DataMgr.MainHandle.OnTTKeyBoardInput(KeyType.Key_NUMBER, KeyValue.PIN_PRESSED_VK_5);
        }

        private void btnNum6_Click(object sender, EventArgs e)
        {
            DataMgr.MainHandle.OnTTKeyBoardInput(KeyType.Key_NUMBER, KeyValue.PIN_PRESSED_VK_6);
        }

        private void btnNum7_Click(object sender, EventArgs e)
        {
            DataMgr.MainHandle.OnTTKeyBoardInput(KeyType.Key_NUMBER, KeyValue.PIN_PRESSED_VK_7);
        }

        private void btnNum8_Click(object sender, EventArgs e)
        {
            DataMgr.MainHandle.OnTTKeyBoardInput(KeyType.Key_NUMBER, KeyValue.PIN_PRESSED_VK_8);
        }

        private void btnNum9_Click(object sender, EventArgs e)
        {
            DataMgr.MainHandle.OnTTKeyBoardInput(KeyType.Key_NUMBER, KeyValue.PIN_PRESSED_VK_9);
        }

        private void btnNum10_Click(object sender, EventArgs e)
        {
            DataMgr.MainHandle.OnTTKeyBoardInput(KeyType.Key_SPACE, KeyValue.PIN_PRESSED_SPACE);
        }

        private void btnNum11_Click(object sender, EventArgs e)
        {
            DataMgr.MainHandle.OnTTKeyBoardInput(KeyType.Key_NUMBER, KeyValue.PIN_PRESSED_VK_0);
        }

        private void btnNum12_Click(object sender, EventArgs e)
        {
            DataMgr.MainHandle.OnTTKeyBoardInput(KeyType.Key_ENTER, KeyValue.PIN_PRESSED_ENTER);
        } 
    }
}
